import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './pages/app';

function debounce (timeout, fn) {
  let _time = null
  return function () {
    let _arg = arguments
    clearTimeout(_time)
    _time = setTimeout(() => {
      fn.apply(this, _arg)
    }, timeout)
  }
}
function throttling (timeout, fn) {
  let _playing = null
  return function () {
    let _arg = arguments
    if (_playing) {
      return
    }
    _playing = true
    setTimeout(() => {
      fn.apply(this, _arg)
      _playing = false
    }, timeout)
  }
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(

    <App />

);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals

